Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress diffs when an empty set is specified for aws_autoscaling_group.availability_zones #1190

Merged
merged 1 commit into from
Jul 24, 2017

Conversation

joshuaspence
Copy link
Contributor

Fixes #1187.

> make testacc TESTARGS='-run=TestAccAWSAutoScalingGroup_emptyAvailabilityZones'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run=TestAccAWSAutoScalingGroup_emptyAvailabilityZones -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSAutoScalingGroup_emptyAvailabilityZones
--- PASS: TestAccAWSAutoScalingGroup_emptyAvailabilityZones (102.35s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	102.372s

Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular reason why the user would ever need to specify both parameters (availability_zones & vpc_zone_identifier)? If not I think it would make more sense to mark those as conflicting via ConflictsWith.

Let me know what you think.

@radeksimko radeksimko added waiting-response Maintainers are waiting on response from community or contributor. bug Addresses a defect in current functionality. labels Jul 20, 2017
@joshuaspence
Copy link
Contributor Author

ConflictsWith won't allow me to do this (which is the original use case I mentioned in the issue):

resource "aws_autoscaling_group" "test" {
  min_size = 0
  max_size = 0

  availability_zones   = []
  launch_configuration = "${aws_launch_configuration.test.name}"
  vpc_zone_identifier  = ["${aws_subnet.test.id}"]
}

@radeksimko radeksimko removed the waiting-response Maintainers are waiting on response from community or contributor. label Jul 20, 2017
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think that using a single config/module for both EC2 Classic and VPC is a dangerous route to choose, but there are apparently other resources which allow this too , so why not 🤷‍♂️

As long as you know what you're doing 😄

I wish we will be able to phase out all these EC2Classic hacks one day...

@radeksimko radeksimko merged commit b08118c into hashicorp:master Jul 24, 2017
@joshuaspence joshuaspence deleted the asg-az branch July 25, 2017 00:58
@radeksimko radeksimko added the upstream-terraform Addresses functionality related to the Terraform core binary. label Oct 31, 2017
mdlavin pushed a commit to mdlavin/terraform-provider-aws that referenced this pull request Dec 9, 2017
I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior):

```
resource "aws_lambda_function" "test" {
  # ...

  vpc_config {
    security_group_ids = []
    subnet_ids         = []
  }
}
```

See also hashicorp#1187 and hashicorp#1190.
mdlavin pushed a commit to mdlavin/terraform-provider-aws that referenced this pull request Jan 3, 2018
I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior):

```
resource "aws_lambda_function" "test" {
  # ...

  vpc_config {
    security_group_ids = []
    subnet_ids         = []
  }
}
```

See also hashicorp#1187 and hashicorp#1190.
mdlavin pushed a commit to mdlavin/terraform-provider-aws that referenced this pull request Jan 17, 2018
I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior):

```
resource "aws_lambda_function" "test" {
  # ...

  vpc_config {
    security_group_ids = []
    subnet_ids         = []
  }
}
```

See also hashicorp#1187 and hashicorp#1190.
mdlavin pushed a commit to mdlavin/terraform-provider-aws that referenced this pull request Jan 22, 2018
I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior):

```
resource "aws_lambda_function" "test" {
  # ...

  vpc_config {
    security_group_ids = []
    subnet_ids         = []
  }
}
```

See also hashicorp#1187 and hashicorp#1190.
philidem pushed a commit to lifeomic/terraform-provider-aws that referenced this pull request Mar 28, 2018
I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior):

```
resource "aws_lambda_function" "test" {
  # ...

  vpc_config {
    security_group_ids = []
    subnet_ids         = []
  }
}
```

See also hashicorp#1187 and hashicorp#1190.
philidem pushed a commit to lifeomic/terraform-provider-aws that referenced this pull request Apr 10, 2018
I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior):

```
resource "aws_lambda_function" "test" {
  # ...

  vpc_config {
    security_group_ids = []
    subnet_ids         = []
  }
}
```

See also hashicorp#1187 and hashicorp#1190.
mdlavin pushed a commit to mdlavin/terraform-provider-aws that referenced this pull request May 31, 2018
I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior):

```
resource "aws_lambda_function" "test" {
  # ...

  vpc_config {
    security_group_ids = []
    subnet_ids         = []
  }
}
```

See also hashicorp#1187 and hashicorp#1190.
mdlavin pushed a commit to lifeomic/terraform-provider-aws that referenced this pull request May 31, 2018
I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior):

```
resource "aws_lambda_function" "test" {
  # ...

  vpc_config {
    security_group_ids = []
    subnet_ids         = []
  }
}
```

See also hashicorp#1187 and hashicorp#1190.
philidem pushed a commit to lifeomic/terraform-provider-aws that referenced this pull request Sep 5, 2018
I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior):

```
resource "aws_lambda_function" "test" {
  # ...

  vpc_config {
    security_group_ids = []
    subnet_ids         = []
  }
}
```

See also hashicorp#1187 and hashicorp#1190.
@ghost
Copy link

ghost commented Apr 11, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. upstream-terraform Addresses functionality related to the Terraform core binary.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to pass a null value for aws_autoscaling_group.availability_zones
2 participants